//
//  NYSettingViewController.m
//  NiuWaJiaoYu
//
//  Created by MinLison on 2017/12/25.
//  Copyright © 2017年 niuwaketang. All rights reserved.
//

#import "NYSettingViewController.h"
#import "NYSettingForm.h"
@interface NYSettingViewController ()

@end

@implementation NYSettingViewController
- (void)didInitializedWithStyle:(UITableViewStyle)style
{
        [super didInitializedWithStyle:style];
}
- (void)viewDidLoad
{
        self.form = [NYSettingForm formDescriptorWithTitle:@"设置"];
        [super viewDidLoad];
}
- (void)initTableView
{
        [super initTableView];
        self.tableView.showsVerticalScrollIndicator = NO;
        self.tableView.showsHorizontalScrollIndicator = NO;
        self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
        self.tableView.backgroundColor = UIColorForBackground;
        self.form = [NYSettingForm formDescriptorWithTitle:@"设置"];
        @weakify(self);
        [self.controllerView.bottomView.actionButton jk_addActionHandler:^(NSInteger tag) {
                @strongify(self);
                [NYUserManager logOut:nil success:^(NSString * _Nonnull sms) {
                        [NYTipClass showText:sms inView:self.view].willHideBlock = ^(UIView *hideInView, BOOL animated) {
                                @strongify(self);
                                [self.navigationController popToRootViewControllerAnimated:YES];
                        };
                } failed:^(NSError * _Nonnull error) {
                        
                }];
        }];
}
- (void)configNavigationBar:(BaseNavigationBar *)navigationBar
{
        [super configNavigationBar:navigationBar];
        self.title = @"设置";
}
/// NavBar
+ (NYViewControllerNavigationBarType)navigationBarType
{
        return NYViewControllerNavigationBarTypeBlue;
}

@end
